<?php $id="form_".uniqid();?>
<table id="<?php echo $id;?>"></table>
<script>
$("#<?php echo $id;?>").DataSource({url:'member/getlist?type=<?php echo $type?>',
	fields:[[
		{field:'id',      title:'ID',  align:'center',width:70,sortable:true},
		{field:'t1',title:'状态 ', align:'center', width:70, sortable:false,formatter:function (v, r) {
            if (r.t1 == '在线') {return v;}else {return '<span style="color: #c0c0c0">' + v + '</span>'}
        }},
		{field:'t2',title:'姓名 ', align:'center', width:100, sortable:true},	
		{field:'t3',title:'帐号',  align:'center', width:120, sortable:true},
		{field:'t4',title:'层级', align:'center', width:120,  sortable:true,formatter:function(v,r){
			return '<b style="color:red" onclick="fc('+r.id+')"><u>'+v+'</u></b>';
		}},	
		{field:'t5',title:'系统额度',  align:'center', width:100,  sortable:true},	
		{field:'t6',title:'所属代理商',align:'center', width:180,  sortable:true},	
		{field:'t7',title:'新增日期',  align:'center', width:180,  sortable:true},
		{field:'t8',title:'状况', align:'center', width:100,  sortable:true},	
		{field:'aa',      title:'功能', align:'center',width:400,sortable:false,formatter:function(v,r){
			return '<a herf="#" class="btn btn-danger btn-xs" onclick=Core.confirm("<?php echo $id;?>",1,"asd","确定停用该会员使用?")>停用</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick=Core.confirm("<?php echo $id;?>",1,"asd","确定停用该会员使用?")>踢线</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick=Core.dialog(\'基本资料设定\',\'member/basic_info\',function(){},true,false);>修改</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs">设定</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick="Core.dialog(\'分层\',\'order/edit\',function(){},true,false)">日志</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs">下注</a>&nbsp;&nbsp;'+
            '<a herf="#" class="btn btn-danger btn-xs" onclick="Core.dialog(\'基本资料编辑\', \'member/detail_info\', function(){},true,false)">资料</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs">现金</a>&nbsp;&nbsp;'+
			'<a herf="#" class="btn btn-danger btn-xs" onclick=Core.confirm("<?php echo $id;?>",1,"asd","确定停用该会员使用?")>更新</a>&nbsp;';
		}}
    ]], tools:[
	{instant:true},
	<?php if(in_array('EDIT',$auth)){?>
	{text:"编辑",iconCls:"icon-edit",handler:function(){
		$('#<?php echo $id?>').DataSource('edit',{title:'查看会员',get:'member/edituser?type=<?php echo $type?>',full:false});
	}},
	<?php }?>
	<?php if(in_array('EXPORT',$auth)){?>
	{text:'导出',iconCls:'icon-excel',handler:function(){
			var params=$('#<?php echo $id?>').DataSource('queryParams');
			Core.Export(params,'orderlist/export');
	}},
	<?php }?>
	<?php if(in_array('DELETE',$auth)){ ?>
	{text:"删除",iconCls:"icon-remove",handler:function(){
		$('#<?php echo $id?>').DataSource('remove',{get:'member/deluser'});
	}},
	<?php }?>
	'|',
		{type:'combobox',text:'代理帐号',width:100,name:'verify_status',value:'', items:'<option value="">所有记录</option><option value="1">通过</option><option value="2">未申请</option><option value="3">申请中</option><option value="4">退回</option><option value="5">拒绝</option>'},
		{type:'combobox',text:'层级',width:100,name:'verify_status',value:'', items:'<option value="">所有记录</option><option value="1">VIP</option><option value="2">金牌</option>'},
		{type:'combobox',text:'状态',width:100,name:'verify_status',value:'', items:'<option value="">所有记录</option><option value="1">停用</option><option value="2">在线</option>'},
		{type:'combobox',text:'来源',width:100,name:'verify_status',value:'', items:'<option value="">所有记录</option><option value="1">PC</option><option value="2">WAP</option><option value="3">IOS</option><option value="4">安卓</option>'},
		
		{type:'datebox', text:'注册日期', width:100,name:'admin'},
		{type:'datebox', text:'-', width:100,name:'zaddtime'},
		{type:'combobox',text:'',width:100,name:'verify_status',value:'', items:'<option value="1">帐号</option><option value="2">注册IP</option><option value="2">登陆IP</option><option value="3">姓名</option><option value="4">手机</option><option value="5">银行卡</option>'},
		{type:'textbox', text:'', width:100,name:'title'},
		{text:"搜索", iconCls:"icon-search", handler:function(){
			$('#<?php echo $id?>').DataSource('search');
		}},
	'-'
	],
	footer:true,
	success:function(){
		$('#admin').datebox('setValue','2013-03-02');
	}
});
function fc(v){
	Core.dialog('分层','member/getfc',function(){},true,false);
}
</script>